package com.code.ext;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;

/**
 * 注解事件监听器Demo
 *
 * @author wangjie
 * @version V1.0
 * @date 2020/1/9
 */
@Service
public class UserService {

    @EventListener(classes={ApplicationEvent.class})
    public void listen(ApplicationEvent event){
        System.out.println("UserService。。。"+event);
    }

}
